﻿<nav class="pagecenter" ng-if="loading==false&&Pager.Data.length>0">
    <ul class="pagination">
        <li ng-if="Pager.PageIndex >0">
            <a href="javascript:(0)" ng-click="Pager.PageIndex = 0">首页</a>
        </li>
        <li ng-if="Pager.PageIndex >0">
            <a href="javascript:(0)" ng-click="Pager.PageIndex=Pager.PageIndex-1">&lt;</a>
        </li>
        <li ng-if="Pager.PageIndex <= 0" class="disabled"><a href="javascript:(0)">首页</a></li>
        <li ng-if="Pager.PageIndex <= 0" class="disabled"><a href="javascript:(0)">&lt;</a></li>

        <li ng-repeat="d in Pager.PageRange" ng-if="$index < Pager.PageIndex+3 && $index > Pager.PageIndex-3" ng-class="{active:$index == Pager.PageIndex}">
            <a ng-if="$index == Pager.PageIndex" href="javascript:void(0)"><span>{{$index+1}}</span></a>
            <a ng-if="$index != Pager.PageIndex" href="javascript:void(0)" ng-click="Pager.PageIndex = $index">{{$index+1}}</a>
        </li>

        <li>
            <span>{{Pager.PageIndex+1}} /{{Pager.PageCount==null?0:Pager.PageCount}}</span>
        </li>
        <li ng-if="Pager.PageIndex+1 < Pager.PageCount">
            <a href="javascript:(0)" ng-click="Pager.PageIndex =Pager.PageIndex +1">&gt;</a>
        </li>
        <li ng-if="Pager.PageIndex+1 < Pager.PageCount">
            <a href="javascript:(0)" ng-click="Pager.PageIndex = Pager.PageCount-1">尾页</a>
        </li>
        <li ng-if="Pager.PageIndex+1 >=Pager.PageCount" class="disabled"><a href="javascript:(0)">&gt;</a></li>
        <li ng-if="Pager.PageIndex+1 >=Pager.PageCount" class="disabled"><a href="javascript:(0)">尾页</a></li>
    </ul>
</nav>